//
//  DianPuViewController.m
//  黑土公社商户端
//
//  Created by 1 on 15/12/26.
//  Copyright © 2015年 刘成. All rights reserved.
//

#import "DianPuViewController.h"
#import "dianPuGuanLiViewController.h"
#import "dingDanGuanLiViewController.h"
#import "kuHuGuanLiViewController.h"
#import "shangPinGuanLiViewController.h"
#import "shuJuTongJiViewController.h"
#import "huoYuanViewController.h"
#import "DingDanViewController.h"
@interface DianPuViewController ()

@property (nonatomic, strong) UITextField *textField;

@end

@implementation DianPuViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:106/255.0 green:221/255.0 blue:86/255.0 alpha:1.0]];
    self.title = @"店铺";
    
    //店铺管理
    UIButton *button6 = [[UIButton alloc]initWithFrame:CGRectMake(0, 150,kScreenWidth/3, 120)];
//    button6.backgroundColor = [UIColor redColor];
    [button6 addTarget:self action:@selector(button6Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button6];
    
    //图片视图
    UIImageView *imageview1 = [[UIImageView alloc] initWithFrame:CGRectMake((button6.frame.size.width-70)/2, 20, 70, 70)];
    [imageview1 setImage:[UIImage imageNamed:@"店铺管理.png"]];
    imageview1.contentMode = UIViewContentModeScaleAspectFit;
//    imageview1.backgroundColor = [UIColor blueColor];
    [button6 addSubview:imageview1];
    
    //创建文本
    UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake((button6.frame.size.width-50)/2, CGRectGetMaxY(imageview1.frame)+5, 50, 20)];
    [label1 setText:@"店铺管理"];
    label1.textAlignment = NSTextAlignmentCenter;
    label1.font = [UIFont systemFontOfSize:10];
    label1.textColor = [UIColor blackColor];
//    label1.backgroundColor = [UIColor greenColor];
    [button6 addSubview:label1];
    
    //订单管理
    UIButton *button7 = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth/3, 150,kScreenWidth/3, 120)];
//    button7.backgroundColor = [UIColor blueColor];
    [button7 addTarget:self action:@selector(button7Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button7];
    
    //图片视图
    UIImageView *imageview2 = [[UIImageView alloc] initWithFrame:CGRectMake((button7.frame.size.width-70)/2, 20, 70, 70)];
    [imageview2 setImage:[UIImage imageNamed:@"订单管理.png"]];
    imageview2.contentMode = UIViewContentModeScaleAspectFit;
//    imageview2.backgroundColor = [UIColor yellowColor];
    [button7 addSubview:imageview2];
    
    //创建文本
    UILabel *label2 = [[UILabel alloc] initWithFrame:CGRectMake((button6.frame.size.width-50)/2, CGRectGetMaxY(imageview2.frame)+5, 50, 20)];
    [label2 setText:@"订单管理"];
    label2.textAlignment = NSTextAlignmentCenter;
    label2.font = [UIFont systemFontOfSize:10];
    label2.textColor = [UIColor blackColor];
//    label2.backgroundColor = [UIColor greenColor];
    [button7 addSubview:label2];
    
    //客户管理
    UIButton *button8 = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth/3*2, 150,kScreenWidth/3, 120)];
//    button8.backgroundColor = [UIColor blueColor];
    [button8 addTarget:self action:@selector(button8Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button8];
    
    //图片视图
    UIImageView *imageview3 = [[UIImageView alloc] initWithFrame:CGRectMake((button8.frame.size.width-70)/2, 20, 70, 70)];
    [imageview3 setImage:[UIImage imageNamed:@"客户管理.png"]];
    imageview3.contentMode = UIViewContentModeScaleAspectFit;
//    imageview3.backgroundColor = [UIColor yellowColor];
    [button8 addSubview:imageview3];
    
    //创建文本
    UILabel *label3 = [[UILabel alloc] initWithFrame:CGRectMake((button8.frame.size.width-50)/2, CGRectGetMaxY(imageview3.frame)+5, 50, 20)];
    [label3 setText:@"客户管理"];
    label3.textAlignment = NSTextAlignmentCenter;
    label3.font = [UIFont systemFontOfSize:10];
    label3.textColor = [UIColor blackColor];
//    label3.backgroundColor = [UIColor greenColor];
    [button8 addSubview:label3];

    //商品管理
    UIButton *button9 = [[UIButton alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(button6.frame),kScreenWidth/3, 120)];
//    button9.backgroundColor = [UIColor redColor];
    [button9 addTarget:self action:@selector(button9Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button9];
    
    //图片视图
    UIImageView *imageview4 = [[UIImageView alloc] initWithFrame:CGRectMake((button9.frame.size.width-70)/2, 20, 70, 70)];
    [imageview4 setImage:[UIImage imageNamed:@"商品管理.png"]];
    imageview4.contentMode = UIViewContentModeScaleAspectFit;
//    imageview4.backgroundColor = [UIColor blueColor];
    [button9 addSubview:imageview4];
    
    //创建文本
    UILabel *label4 = [[UILabel alloc] initWithFrame:CGRectMake((button9.frame.size.width-50)/2, CGRectGetMaxY(imageview4.frame)+5, 50, 20)];
    [label4 setText:@"商品管理"];
    label4.textAlignment = NSTextAlignmentCenter;
    label4.font = [UIFont systemFontOfSize:10];
    label4.textColor = [UIColor blackColor];
//    label4.backgroundColor = [UIColor greenColor];
    [button9 addSubview:label4];
    
    //数据统计
    UIButton *button10 = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth/3, CGRectGetMaxY(button6.frame),kScreenWidth/3, 120)];
//    button10.backgroundColor = [UIColor blueColor];
    [button10 addTarget:self action:@selector(button10Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button10];
    
    //图片视图
    UIImageView *imageview5 = [[UIImageView alloc] initWithFrame:CGRectMake((button10.frame.size.width-70)/2, 20, 70, 70)];
    [imageview5 setImage:[UIImage imageNamed:@"数据统计.png"]];
    imageview5.contentMode = UIViewContentModeScaleAspectFit;
//    imageview5.backgroundColor = [UIColor yellowColor];
    [button10 addSubview:imageview5];
    
    //创建文本
    UILabel *label5 = [[UILabel alloc] initWithFrame:CGRectMake((button10.frame.size.width-50)/2, CGRectGetMaxY(imageview5.frame)+5, 50, 20)];
    [label5 setText:@"数据统计"];
    label5.textAlignment = NSTextAlignmentCenter;
    label5.font = [UIFont systemFontOfSize:10];
    label5.textColor = [UIColor blackColor];
//    label5.backgroundColor = [UIColor greenColor];
    [button10 addSubview:label5];
    
    //微信支付
    UIButton *button11 = [[UIButton alloc]initWithFrame:CGRectMake(kScreenWidth/3*2, CGRectGetMaxY(button6.frame),kScreenWidth/3, 120)];
//    button11.backgroundColor = [UIColor blueColor];
    [button11 addTarget:self action:@selector(button11Action:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button11];
    
    //图片视图
    UIImageView *imageview6 = [[UIImageView alloc] initWithFrame:CGRectMake((button11.frame.size.width-70)/2, 20, 70, 70)];
    [imageview6 setImage:[UIImage imageNamed:@"货源.png"]];
    imageview6.contentMode = UIViewContentModeScaleAspectFit;
//    imageview6.backgroundColor = [UIColor yellowColor];
    [button11 addSubview:imageview6];
    
    //创建文本
    UILabel *label6 = [[UILabel alloc] initWithFrame:CGRectMake((button11.frame.size.width-50)/2, CGRectGetMaxY(imageview6.frame)+5, 50, 20)];
    [label6 setText:@"货源"];
    label6.textAlignment = NSTextAlignmentCenter;
    label6.font = [UIFont systemFontOfSize:10];
    label6.textColor = [UIColor blackColor];
//    label6.backgroundColor = [UIColor greenColor];
    [button11 addSubview:label6];
}

-(void) button6Action:(id)sender{
    
    dianPuGuanLiViewController *dianpuguanliVC = [[dianPuGuanLiViewController alloc]init];
    [self.navigationController pushViewController:dianpuguanliVC animated:YES];
}
-(void) button7Action:(id)sender{
    
    DingDanViewController *dingdanguanliVC = [[DingDanViewController alloc]init];
    [self.navigationController pushViewController:dingdanguanliVC animated:YES];
}
-(void) button8Action:(id)sender{
    
    kuHuGuanLiViewController *kehuguanliVC = [[kuHuGuanLiViewController alloc]init];
    [self.navigationController pushViewController:kehuguanliVC animated:YES];
}
-(void) button9Action:(id)sender{
    
    shangPinGuanLiViewController *shangpinguanliVC = [[shangPinGuanLiViewController alloc]init];
    [self.navigationController pushViewController:shangpinguanliVC animated:YES];
}
-(void) button10Action:(id)sender{
    
    shuJuTongJiViewController *shujutongjiVC = [[shuJuTongJiViewController alloc]init];
    [self.navigationController pushViewController:shujutongjiVC animated:YES];
}
-(void) button11Action:(id)sender{
    
    huoYuanViewController *huoyuanVC = [[huoYuanViewController alloc]init];
    [self.navigationController pushViewController:huoyuanVC animated:YES];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
